﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace homework1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入第一个操作数");
            int a1, a2;
            a1 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("请输入第二个操作数");
            a2 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("请输入操作符");
            Char op;
            op = Convert.ToChar(Console.ReadLine());
            int result=0;
            switch (op)
            {
                case '+':result = a1 + a2;break;
                case '-': result = a1 - a2; break;
                case '*': result = a1 * a2; break;
                case '%': result = a1 % a2; break;
                case '/': result = a1 / a2; break;
                default:
                    Console.WriteLine("错误");break;

            }
            Console.WriteLine("最后的结果是{0}" , result);
            Console.ReadKey();


        }
    }
}
